home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / DATABASE / REPLC105.ZIP / REPLACE.TXT < prev   
Text File  |  1993-10-21  |  8KB  |  163 lines

  1. Find And Replace         (REPLACE.MDA)
  2.  
  3. Summary:
  4.   This program provides a "Find and Replace" function for Queries,
  5.   Forms, Reports, and Macros (MSAccess 1.1 only provides Find and
  6.   Replace for Modules).  I wrote this module to facilitate name changes
  7.   since MSAccess provides such poor name change support.  The intended
  8.   user of this module is a programmer.
  9.  
  10.  
  11. To install and run Find and Replace:
  12.  
  13.   1 Move the replace.mda file to your ACCESS directory (probably
  14.     c:\ACCESS)
  15.  
  16.   2 Using Microsoft Windows Notepad or another text editor, open
  17.     MSACCESS.INI (in your WINDOWS directory), and add the following
  18.     lines under the sections indicated ([Libraries] and [Menu Add-ins];
  19.     add these section headings if they are not already present):
  20.  
  21.        [Libraries]
  22.        replace.mda=ro
  23.  
  24.        [Menu Add-ins]
  25.        &Find and Replace==StartFindAndReplace()
  26.  
  27.  
  28.   3 Save the file, and restart Microsoft Access.
  29.  
  30.   4 Open the database you want to use Find and Replace with.
  31.  
  32.   5 Find and Replace now appears as a choice on the help menu.  Select
  33.     it.  The Find and Replace form should appear.
  34.  
  35.   6 Enter the text to be searched for and the text that will replace it.
  36.     WildCards are not permitted.
  37.  
  38.   7 If you want to restrict the search to Match Whole Words only (words
  39.     consist of A-Z, a-z, _, 0-9) check the "Match Whole Words/Names
  40.     Only" box.  If you want to search only objects with a certain name
  41.     enter that in the "Object Names Like" box (wildcards OK).  If
  42.     you want Find and Replace to try to capitalize things properly
  43.     check "Clean-up to Proper Case" (It will look on both sides of
  44.     the found string, to the beginning and end of the word containing
  45.     the found string, to perform this; it will not capitalize lower
  46.     case prefixes as defined by the Leszynski/Reddick naming
  47.     standard; it will not change upper case to lower case).  The
  48.     proper-case cleanup is usually only useful when the original
  49.     names have spaces or underscores ('_') separating words (within
  50.     a name) needing capitalization.
  51.  
  52.   8 Choose the object type in which you want to search (Query, Macro, Form,
  53.     Report, or Module) and push the appropriate button to start the
  54.     search. For Form and Report searches you can specify via the check
  55.     boxes what properties to search (RecordSource & SourceObject,
  56.     ControlName, ControlSource & LinkFields, RowSource, Report
  57.     Sorting/Grouping fields, OtherProperties - all other properties that
  58.     can specify macros or functions), and Caption & ValidationText &
  59.     StatusText.
  60.  
  61.   9 Assuming you haven't checked the "Replace Without Asking" box, when
  62.     a match is found a message box is displayed.  The object and
  63.     property in which the match was found is indicated at the top of the
  64.     box.  Just underneath that, the current value of the property is
  65.     displayed.  The line after that shows what the value will be changed to.
  66.     At the bottom are three buttons: Yes, No, and Cancel.
  67.     You can select "Yes" to do the replacement, "No" to
  68.     proceed to the next match, or "Cancel" to stop the entire process.
  69.  
  70.  
  71. Notes:
  72.    1) FIND AND REPLACE CAN BE A DANGEROUS TOOL.  IF YOU'RE NOT SURE WHAT
  73.       YOU'RE DOING, DON'T DO IT.  Even if you think you know what you're
  74.       doing, always have a backup copy of your database that is
  75.       relatively up to date.
  76.  
  77.    2) For reports, searching the Sorting/Grouping fields slows down the
  78.       find substantially (up to 10 times slower than without searching
  79.       sorting/grouping).  If you don't need to search in the
  80.       sorting/grouping fields then uncheck the Report Sorting/Grouping
  81.       option box.  Also, searching report sorting/grouping fields uses
  82.       SendKeys and control-c (copy) and control-v (paste).  If you have
  83.       redefined these keys (as hot keys for example) it won't work.  If it
  84.       doesn't work you'll have to do report searches without the
  85.       sorting/grouping option checked.  When (if) Microsoft provides
  86.       access to these properties from Access Basic I will eliminate the
  87.       reliance on SendKeys (which will also dramatically speed things up).
  88.  
  89.  
  90. What Find and Replace Searches:
  91.  
  92.   Queries:  The field specification, table/query names, and criteria.
  93.  
  94.   Forms:  Properties that can specify macros, functions, field names,
  95.           control names, or table/query names: BeforeUpdate, AfterUpdate,
  96.           OnEnter, OnExit, OnDblClick, OnPush, ValidationRule,
  97.           DefaultValue, RecordSource, ControlName, ControlSource,
  98.           RowSource, RowSourceType, SourceObject, LinkMasterFields, and
  99.           LinkChildFields properties.  It also will search (if the option
  100.           is checked) Caption, StatusText, and ValidationText.
  101.  
  102.   Reports: Properties that can specify macros, functions, field names,
  103.            control names, or table/query names:  OnOpen, OnClose,
  104.            OnFormat, OnPrint, RecordSource, SourceObject, ControlName,
  105.            ControlSource, LinkChildFields, LinkMasterFields, RowSource,
  106.            and Sorting/Grouping properties.  Other properties: Caption.
  107.  
  108.   Macros:  Macro Labels (Names), Conditions, and Parameters to Macro
  109.            Actions
  110.  
  111.   Modules: The module search simply invokes the Microsoft search function
  112.            for modules.  The limitations and bugs of MSAccess apply here.
  113.  
  114.  
  115. Version Information:
  116.  
  117.   ver 1.00   8/18/93  Initial Version
  118.   ver 1.01   8/18/93  Added SourceObject and LinkFields properties to
  119.                       Form and Report searches.
  120.   ver 1.02   8/24/93  Added "Match Whole Word Only" option.  Altered
  121.                       Find In Queries to avoid GPF bug in Access when
  122.                       reading a query's SQL string that is longer than 1K.
  123.   ver 1.03   9/9/93   Added searching of report sorting/grouping fields.
  124.                       Added Module searches.  Added the DefaultValue
  125.                       property to form searches. Converted from Access 1.1
  126.                       format to 1.0 format to be compatible with 1.0
  127.                       users.  Added gas gauge progress indication.
  128.   ver 1.04   9/20/93  Added a clean-up to proper case option.
  129.   ver 1.05  10/21/93  Added RowSourceType to properties searched in forms
  130.                       (since you can specify an function here).  Added
  131.                       option to search in Caption, ValidationText, and
  132.                       StatusText properties in forms and reports.  Added
  133.                       "Replace Without Asking" option.  Fixed module
  134.                       search so it will complete properly.
  135.  
  136.  
  137.  
  138. Rights, Permissions and Disclaimers:
  139.  
  140.   Find and Replace Software, Copyright 1993 Rick Fisher, All Rights
  141.   Reserved
  142.  
  143.   This Program is supplied "AS IS" WITHOUT ANY WARRANTY OF ANY KIND.  In
  144.   no event shall the author be liable for any damages whatsoever in
  145.   connection with your use of this program.
  146.  
  147.   Please note that this software is totally unsupported.  All software has
  148.   bugs and this is no exception (this is not commercial software and thus
  149.   has not been extensively tested).  USE AT YOUR OWN RISK.
  150.  
  151.   You may use this software free of charge for your personal use under the
  152.   following conditions:  1) you agree to the above disclaimer of warranty
  153.   & liability, 2) you agree not to remove the disclaimer or any of the
  154.   copyright notices, and 3) you agree not to sell or resell the software
  155.   (or any part of it).
  156.  
  157.  
  158.  
  159.  
  160. Rick Fisher, CompuServe ID 70743,2514.
  161.  
  162.                                                  (Replace.txt 10/21/93)
  163.